function bind(fn, ctx) {
  function boundFn(a) {
    const l = arguments.length
    return l ? l > 1 ? fn.apply(ctx, arguments) : fn.call(ctx, a) : fn.call(ctx)
  }
  // record original fn length
  boundFn._length = fn.length
  return boundFn
}
exports.bind = bind

exports.noop = function() {}